home *** CD-ROM | disk | FTP | other *** search
Wrap
EEEELLLLFFFF____GGGGEEEETTTTSSSSCCCCNNNN((((3333EEEE)))) EEEELLLLFFFF____GGGGEEEETTTTSSSSCCCCNNNN((((3333EEEE)))) NNNNAAAAMMMMEEEE _eeee_llll_ffff______gggg_eeee_tttt_ssss_cccc_nnnn, _eeee_llll_ffff______nnnn_dddd_xxxx_ssss_cccc_nnnn, _eeee_llll_ffff______nnnn_eeee_wwww_ssss_cccc_nnnn, _eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn - get section information SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS _cccc_cccc [_f_l_a_g ...] _f_i_l_e ... _----_llll_eeee_llll_ffff [_l_i_b_r_a_r_y ...] _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_eeee_llll_ffff_...._hhhh_>>>> _EEEE_llll_ffff______SSSS_cccc_nnnn _****_eeee_llll_ffff______gggg_eeee_tttt_ssss_cccc_nnnn_((((_EEEE_llll_ffff _****_eeee_llll_ffff_,,,, _ssss_iiii_zzzz_eeee______tttt _iiii_nnnn_dddd_eeee_xxxx_))))_;;;; _ssss_iiii_zzzz_eeee______tttt _eeee_llll_ffff______nnnn_dddd_xxxx_ssss_cccc_nnnn_((((_EEEE_llll_ffff______SSSS_cccc_nnnn _****_ssss_cccc_nnnn_))))_;;;; _EEEE_llll_ffff______SSSS_cccc_nnnn _****_eeee_llll_ffff______nnnn_eeee_wwww_ssss_cccc_nnnn_((((_EEEE_llll_ffff _****_eeee_llll_ffff_))))_;;;; _EEEE_llll_ffff______SSSS_cccc_nnnn _****_eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn_((((_EEEE_llll_ffff _****_eeee_llll_ffff_,,,, _EEEE_llll_ffff______SSSS_cccc_nnnn _****_ssss_cccc_nnnn_))))_;;;; DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN These functions provide indexed and sequential access to the sections associated with the ELF descriptor _e_l_f. If the program is building a new file, it is responsible for creating the file's ELF header before creating sections; see _eeee_llll_ffff______gggg_eeee_tttt_eeee_hhhh_dddd_rrrr(3E). _eeee_llll_ffff______gggg_eeee_tttt_ssss_cccc_nnnn returns a section descriptor, given an _i_n_d_e_x into the file's section header table. Note the first ``real'' section has index 1. Although a program can get a section descriptor for the section whose _i_n_d_e_x is 0 (_SSSS_HHHH_NNNN______UUUU_NNNN_DDDD_EEEE_FFFF, the undefined section), the section has no data and the section header is ``empty'' (though present). If the specified section does not exist, an error occurs, or _e_l_f is null, _eeee_llll_ffff______gggg_eeee_tttt_ssss_cccc_nnnn returns a null pointer. _eeee_llll_ffff______nnnn_eeee_wwww_ssss_cccc_nnnn creates a new section and appends it to the list for _e_l_f. Because the _SSSS_HHHH_NNNN______UUUU_NNNN_DDDD_EEEE_FFFF section is required and not ``interesting'' to applications, the library creates it automatically. Thus the first call to _eeee_llll_ffff______nnnn_eeee_wwww_ssss_cccc_nnnn for an ELF descriptor with no existing sections returns a descriptor for section 1. If an error occurs or _e_l_f is null, _eeee_llll_ffff______nnnn_eeee_wwww_ssss_cccc_nnnn returns a null pointer. After creating a new section descriptor, the program can use _eeee_llll_ffff______gggg_eeee_tttt_ssss_hhhh_dddd_rrrr to retrieve the newly created, ``clean'' section header. The new section descriptor will have no associated data [see _eeee_llll_ffff______gggg_eeee_tttt_dddd_aaaa_tttt_aaaa(3E)]. When creating a new section in this way, the library updates the _eeee______ssss_hhhh_nnnn_uuuu_mmmm member of the ELF header and sets the _EEEE_LLLL_FFFF______FFFF______DDDD_IIII_RRRR_TTTT_YYYY bit for the section [see _eeee_llll_ffff______ffff_llll_aaaa_gggg(3E)]. If the program is building a new file, it is responsible for creating the file's ELF header [see _eeee_llll_ffff______gggg_eeee_tttt_eeee_hhhh_dddd_rrrr(3E)] before creating new sections. _eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn takes an existing section descriptor, _s_c_n, and returns a section descriptor for the next higher section. One may use a null _s_c_n to obtain a section descriptor for the section whose index is 1 (skipping the section whose index is _SSSS_HHHH_NNNN______UUUU_NNNN_DDDD_EEEE_FFFF). If no further sections are present or an error occurs, _eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn returns a null pointer. PPPPaaaaggggeeee 1111 EEEELLLLFFFF____GGGGEEEETTTTSSSSCCCCNNNN((((3333EEEE)))) EEEELLLLFFFF____GGGGEEEETTTTSSSSCCCCNNNN((((3333EEEE)))) _eeee_llll_ffff______nnnn_dddd_xxxx_ssss_cccc_nnnn takes an existing section descriptor, _s_c_n, and returns its section table index. If _s_c_n is null or an error occurs, _eeee_llll_ffff______nnnn_dddd_xxxx_ssss_cccc_nnnn returns _SSSS_HHHH_NNNN______UUUU_NNNN_DDDD_EEEE_FFFF. EEEEXXXXAAAAMMMMPPPPLLLLEEEE An example of sequential access appears below. Each pass through the loop processes the next section in the file; the loop terminates when all sections have been processed. _ssss_cccc_nnnn _==== _0000_;;;; _wwww_hhhh_iiii_llll_eeee _((((_((((_ssss_cccc_nnnn _==== _eeee_llll_ffff______nnnn_eeee_xxxx_tttt_ssss_cccc_nnnn_((((_eeee_llll_ffff_,,,, _ssss_cccc_nnnn_))))_)))) _!!!!_==== _0000_)))) _{{{{ _////_**** _pppp_rrrr_oooo_cccc_eeee_ssss_ssss _ssss_eeee_cccc_tttt_iiii_oooo_nnnn _****_//// _}}}} SSSSEEEEEEEE AAAALLLLSSSSOOOO _eeee_llll_ffff(3E), _eeee_llll_ffff______bbbb_eeee_gggg_iiii_nnnn(3E), _eeee_llll_ffff______ffff_llll_aaaa_gggg(3E), _eeee_llll_ffff______gggg_eeee_tttt_dddd_aaaa_tttt_aaaa(3E), _eeee_llll_ffff______gggg_eeee_tttt_eeee_hhhh_dddd_rrrr(3E), _eeee_llll_ffff______gggg_eeee_tttt_ssss_hhhh_dddd_rrrr(3E). PPPPaaaaggggeeee 2222